package com.canto.wanna.user.services.impl;

import com.canto.common.services.DataService;
import com.canto.wanna.user.dao.MenuDao;
import com.canto.wanna.user.pojo.doo.MenuDO;
import com.canto.wanna.user.pojo.entity.Menu;
import com.canto.wanna.user.pojo.query.MenuQuery;
import com.canto.wanna.user.services.MenuService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 菜单
 *
 * @Author jsryin
 * @Date 2021/7/17 11:12
 */
@Service
@Transactional(readOnly = true)
public class MenuServiceImpl extends DataService<MenuDao> implements MenuService {

    @Override
    public MenuDO get(MenuQuery menuQuery) {
        return super.get(menuQuery);
    }

    public List<MenuDO> findList(MenuQuery menuQuery) {
        return super.findList(menuQuery);
    }

    @Transactional(readOnly = false, rollbackFor = Exception.class)
    public long save(Menu menu) {
        return super.save(menu);
    }

    @Transactional(readOnly = false, rollbackFor = Exception.class)
    public long delete(Menu menu) {
        return super.delete(menu);
    }

}
